ungroup
{dplyr}
Resolve grouping created with “group_by”
which.max
{base}
return index of the largest value in a vector
addmargins
{stats}
Puts Arbitrary Margins on Multidimensional Tables or Arrays
xlab
{GGPLOT2}
Label the x axis (ggplot)
summary
{base}
Obtain summary statistics or detailed regression output
stargazer
{stargazer}
Create a regression output table
cut
{base}
Convert Numeric to Factor
lm
{base}
Fit a linear model
dim
{base}
Get dimensions of a data frame
theme
{GGPLOT2}
Set theme for GGPLOT2
sample_n
{dplyr}
Sample a number of observations from a data frame
mutate
{dplyr}
Modify/create a column in a data frame
c
{base}
Combine values/vectors into a vector
matrix
{base}
Creates a matrix from the given set of values.
group_by
{dplyr}
Group tibble/data.frame by a factor variable. All further tidyverse operations are performed group-wise
plot
{graphics}
Generic function from base R to produce a plot
names
{base}
Retrieve names of a list/vector
sum
{base}
Get sum of numeric values or a vector
prop.test
{stats}
Test of Equal or Given Proportions
runif
{stats}
Draws ranndom numbers from the uniform distribution
theme_classic
{GGPLOT2}
A minimalistic theme with no gridlines
round
{base}
Rounds numbers
scale_y_continuous
{GGPLOT2}
Customise continuous y axis
slice
{dplyr}
Subset rows using their positions
after_stat
{GGPLOT2}
Control aesthetic evaluation. On the module used for displying percent
tabulate
{base}
Counts the number of times each integer occurs in an integer-only vector
coord_flip
{GGPLOT2}
Flip the x and y axes of a graph
ncol
{base}
Get number of columns of a data frame
cbind
{base}
Combine R objects by columns
which
{base}
return indexes of TRUE entries of a logical vector
attach
{base}
Attach Set of R Objects to Search Path
expression
{base}
Used in plots to add symbols to axes
tapply
{base}
Create statistical summaries by group based on the levels of one or several factors
boxplot
{graphics}
Plot a simple box plot
geom_vline
{GGPLOT2}
Draws a vertical line
as.numeric
{base}
Coerce a vector to numeric
ggplot
{GGPLOT2}
Create a ggplot graph
read.spss
{foreign}
Read a .sav file (SPSS data)
pie
{graphics}
Creates a basic pie chart
ifelse
{base}
Return a or b depending on the value of test
with
{base}
evaluate expression in the context of a data frame
par
{graphics}
Set parameters of the plotting device
set.seed
{base}
Initialise a pseudorandom number generator.
range
{base}
Return range of values
confint
{stats}
Calculate confidence Intervals for Model Parameters
element_text
{GGPLOT2}
Customise text in GGPLOT2
table
{base}
Obtain frequency table of a variable/cross-tabulation of two variables
order
{base}
Get indexes that will sort a vector
theme_bw
{GGPLOT2}
A black and white ggplot theme
freq
{questionr}
Generate frequency tables
ordered
{dplyr}
Create an ordered factor
is.na
{base}
Check if a value is NA/elements of vector are NA
cor.test
{stats}
Test for Association/Correlation Between Paired Samples
predict
{stats}
Predict Probability
geom_ribbon
{GGPLOT2}
Generates an area plot
nrow
{base}
Get number of rows of a data frame
desc
{dplyr}
Arrange in descending order
read_dta
{haven}
Read a .dta file (Stata data)
ylab
{GGPLOT2}
Label the y axis (ggplot)
complete.cases
{stats}
Find Complete Cases
rm
{base}
Remove objects
unique
{base}
get unique elements
geom_smooth
{GGPLOT2}
Generates a smoothed conditional means curve / line
quantile
{stats}
Obtain empirical quantiles of a vector
aes
{GGPLOT2}
Construct aesthetic mapping of a ggplot graph
labs
{GGPLOT2}
Customise labels in GGPLOT2
head
{utils}
Show first 5 rows of a data frame
get_mode
{rstatix}
Compute the mode in a given vector.
seq
{base}
Create a sequence
dnorm
{stats}
Density distribution for the normal distribution
geom_histogram
{GGPLOT2}
Generates a histogram
grid.arrange
{gridExtra}
Places graphical objects into a rectangular grid
setwd
{base}
Set Working Directory
geom_density
{GGPLOT2}
Generates a density plot
prop.table
{base}
Transform frequency table into table of proportions
rnorm
{base}
Generate random numbers from a normal distribution
data.frame
{base}
Create a data.frame from vectors
mean
{base}
Get mean of a vector
factor
{base}
Create a factor
lprop
{questionr}
Display row percentages of a two-way frequency table
t.test
{stats}
Performs one and two sample t-tests on vectors of data.
select
{dplyr}
Select columns from a tibble/data frame
as.data.frame
{base}
Functions to check if an object is a data frame, or coerce it if possible.
View
{base}
View a data frame
sd
{stats}
Get standard deviation of a vector
ggtitle
{GGPLOT2}
Generates a title for a ggplot graph
levels
{base}
Get levels of a factor
summarise
{dplyr}
collapse the dataset to a summary statistic. Usually used with group_by()
geom_hline
{GGPLOT2}
Add a horizontal line in GGPLOT2
max
{base}
Get maximum of a vector
str
{utils}
Get the structure of an R object
geom_segment
{GGPLOT2}
Generates a line segment or curve
rbind
{base}
Combine R objects by rows
chisq.test
{stats}
Chi-Squared test (e.g. for cross-tabulations)
arrange
{dplyr}
Sort values of data frame according to a variable/combination of varaibles
geom_bar
{GGPLOT2}
Generates a bar chart
scale_colour_manual
{GGPLOT2}
Create your own discrete scale
rbeta
{stats}
Beta Random Number Generating Function
geom_point
{GGPLOT2}
Generates a scatter plot
install.packages
{base}
Install R package
bar
{base}
Used for annotations, such as “expression(paste(”-“,bar(y)))”
ls.str
{utils}
Similarly to ls, with a print() method that calls str() on each object
plotPlane
{rockchalk}
Draw a 3-D regression plot for two predictors
library
{base}
Load an R package
reorder
{stats}
Reorder Levels of Factor based on the values of a second variable, usually numeric.
arrow
{GGPLOT2}
Draw an arrow in a ggplot graph
scale_x_continuous
{GGPLOT2}
Customise continuous x axis
cor
{stats}
Calculate Correlation Matrix
subset
{base}
Return subsets of vectors, matrices or data frames which meet conditions.
min
{base}
Get minimum of a vector
hist
{graphics}
Plot a simple histogram
ls
{base}
Return a vector of character strings giving the names of the objects in the specified environment
read_excel
{readxl}
Read an Excel file
filter
{dplyr}
Filter out rows of a data frame according to logical vector
barplot
{graphics}
Plot a simple bar plot
median
{stats}
Get median of a vector
print
{base}
Print object to the console
element_blank
{GGPLOT2}
This theme element draws nothing, and assigns no space
recode
{dplyr}
Recode a variable
as.factor
{base}
Coerce a vector to factor
sample
{base}
Takes a sample of the specified size
class
{base}
Retrieve class of an R object
colnames
{base}
Retrieve column names of a data frame
read.csv
{utils}
Read a csv file to data frame. Specify stringsAsFactors = FALSE to keep all string columns as characters
var
{stats}
Calculate variance
The end!